<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

namespace app\common\validate;

/**
 * Description of LoginValidate
 *
 * @author DevPHP
 * @version 2018-4-10
 */
class LoginWithPasswordValidate extends \think\Validate {

    protected $batch = false;
    protected $rule = [
        'login_id' => 'require|max:16',
        'login_id' => 'alphaDash',
        'password' => 'require|max:32',
    ];
    protected $message = [
        'login_id.require' => '登录名未填写',
        'login_id.alphaDash' => '登录名只能是字母、数字和下划线',
        'login_id.max' => '登录名最多不能超过16个字符',
        'password.require' => '密码未填写',
        'password.max' => '密码最多不能超过32个字符',
    ];

}
